<template>
	<view class="index">
		<view class="item f-x-bt  mb10 c3" v-for="(item,index) in list" :key="index" @click="goDl(item)">
			<view class="f-s ">
				<text>{{item.name}}</text>
			</view>
			<u-icon size="20" color="#999" name="arrow-right"></u-icon>
		</view>
		<view v-if="list.length<=0" class="np f-c-c">
			<view class="iconfont icon-queshengtu cb" style="font-size: 90rpx;"></view>
			<view class="f12 cb mt20">暂无数据</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				total: 0,
				list: []
			}
		},
		onLoad() {
			this.fetchData()
		},
		methods: {
			async fetchData() {
				const {
					data: {
						list,
						total
					},
				} = await this.beg.request({
					url: this.api.helpers,
					data: {
						pageSize: 999
					},
				})
				this.list = list
				this.total = total
			},
			goDl(v) {
				uni.setStorageSync('fwb', v.body)
				uni.navigateTo({
					url: `/pages/mine/fwb?t=${v.name}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.index {
		padding: 24upx;
		background-color: #f6f6f6;

		.item {
			width: 100%;
			border-radius: 7px;
			padding: 35upx 24upx;
			background-color: #fff;

			/deep/.u-tag--medium {
				margin-left: 8px;
				height: 18px;
				line-height: 18px;
				padding: 0 5px;
			}

			/deep/.u-tag__text--medium {
				font-size: 12px;
			}
		}
	}
</style>